package TitleScreen;

import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;

/**
 * Initalizes the GUI
 * 
 * @author Thomas Felder
 */
public class startView extends JFrame {
	startLogoPanel logo = new startLogoPanel();
	startComponentPanel form = new startComponentPanel();

	public startView() {
		super("Haggis");
		initGui();
	}

	public void initGui() {
		setContentPane(new JLabel(new ImageIcon(
				"images/GUI_LogIn_Background.png")));
		setSize(700, 400); //x,y
		setResizable(false);
		setLocationRelativeTo(null);
		setDefaultCloseOperation(3); //3==EXIT_ON_CLOSE

		setLayout(new BorderLayout());
		add(logo, BorderLayout.NORTH);
		add(form, BorderLayout.CENTER); // Problem: Center stretches through
										// whole JFrame, workaround: the white
										// square is on bg
		setVisible(true);
	}

}
